package com.rany.day05.demo07;

public class Test {
    public static void main(String[] args) {
        Hero hero = new Hero();
        hero.setName("lin");
        //使用匿名内部类和匿名对象
        hero.setSkill(new Skill() {
            @Override
            public void skill() {
                System.out.println("biubiubiu");
            }
        });
        hero.attack();
    }
}
